home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / dme / rexx.h < prev    next >
C/C++ Source or Header  |  1997-09-09  |  3KB  |  94 lines

  1. /*
  2.  *  REXX.H
  3.  *
  4.  *    (c)Copyright 1992-1997 Obvious Implementations Corp.  Redistribution and
  5.  *    use is allowed under the terms of the DICE-LICENSE FILE,
  6.  *    DICE-LICENSE.TXT.
  7.  *
  8.  *  Definitions for the ARexx interface, in addition to the ARexx includes.
  9.  *
  10.  */
  11.  
  12. #ifndef REXX_STORAGE_H
  13. #include "rexx/storage.h"
  14. #endif
  15.  
  16. #ifndef REXX_H
  17. #define REXX_H
  18.  
  19.  
  20.  
  21. /*  More RexxMsg field definitions, to make life a little easier.         */
  22.  
  23. #define  ACTION(rmp)     (rmp->rm_Action)    /* command (action) code        */
  24. #define  RESULT1(rmp)    (rmp->rm_Result1)   /* primary result (return code) */
  25. #define  RESULT2(rmp)    (rmp->rm_Result2)   /* secondary result             */
  26. #define  COMM_ADDR(rmp)  (rmp->rm_CommAddr)  /* host address (port name)     */
  27. #define  FILE_EXT(rmp)   (rmp->rm_FileExt)   /* file extension               */
  28.  
  29.  
  30.  
  31. /*
  32.  *  Error Level Definitions   [ PRELIMINARY - SUBJECT TO CHANGE ]
  33.  *
  34.  *  Definitions for internal  (dme)  error reporting begin with CMD_
  35.  *  Definitions for external (ARexx) error reporting begin with MAC_
  36.  *
  37.  *
  38.  *         0 - command execution successful [normal]       (i.e., title = OK)
  39.  *         1 - command execution successful [alternate]  (i.e., title = OK)
  40.  *         2 - command execution successful [normal]       (don't alter title)
  41.  *         3 - command execution successful [alternate]  (don't alter title)
  42.  *         4 - reserved
  43.  *         5 - command could not complete requested function
  44.  *        10 - command was unable to process correctly
  45.  *        20 - command failure detected - data integrity in question
  46.  *        50 - internal error detected by  dme  or  ARexx
  47.  *
  48.  *  Only levels 0 and 1 allow the ARexx interface code to explicitly set title.
  49.  *
  50.  *
  51.  *  Eg:      0 - the normal case ("OK")
  52.  *         1 - a secondary succeeful result ("OK")
  53.  *         2 - normal, but may have put up an informational message
  54.  *         3 - secondary normal, but may have informational message
  55.  *         4 -
  56.  *         5 - "find" didn't find, "file not found", "block not marked", etc.
  57.  *        10 - "command not found", "syntax error", etc.
  58.  *        15 - a sever failure; "write failed", "unable to open write file", etc.
  59.  *        20 - maybe a sequence of commands that failed; may have modified data
  60.  *        50 - dunno, but definitely bad shit
  61.  */
  62.  
  63. #define  CMD_VALID0        0
  64. #define  CMD_VALID1        1
  65. #define  CMD_VALID2        2
  66. #define  CMD_VALID3        3
  67. #define  CMD_VALID4        4
  68. #define  CMD_FAILED        5
  69. #define  CMD_ERROR       10
  70. #define  CMD_SEVERE       15
  71. #define  CMD_ABORT       20
  72. #define  CMD_MALFUNCTION   50
  73.  
  74.  
  75. /*  Similar to the internal command error levels above, for the moment. */
  76.  
  77. #define  MAC_VALID0        0
  78. #define  MAC_VALID1        1
  79. #define  MAC_VALID2        2
  80. #define  MAC_VALID3        3
  81. #define  MAC_VALID4        4
  82. #define  MAC_FAILED        5
  83. #define  MAC_ERROR       10
  84. #define  MAC_SEVERE       15
  85. #define  MAC_ABORT       20
  86. #define  MAC_MALFUNCTION   50
  87.  
  88.  
  89. #define  CMD_INITIAL       0
  90. #define  TITLE_THRESHHOLD  CMD_VALID1
  91.  
  92. #endif
  93.  
  94.